<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('调课列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">

            </form>
        </div>


        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<script type="javascript">
    fun

</script>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('school:course:edit')}]];
        var removeFlag = [[${@permission.hasPermi('school:course:remove')}]];
        var prefix = ctx + "school/course";
        var courseNoData = [[${@dict.getType('sc_course_no')}]];

        $(function() {
            var options = {
                url: prefix + "/approveList",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/setTeacher/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "调课",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: 'id',
                    visible: false
                },
                {
                    field: 'courseNo',
                    title: '课程节次',
                    formatter: function(value, row, index) {
                        return $.table.selectDictLabel(courseNoData, value);
                    }
                },
                {
                    field: 'teacherName',
                    title: '申请老师'
                },

                {
                    field: 'substituteTeacherName',
                    title: '代课老师'
                },
                {
                    field: 'gradeName',
                    title: '年级'
                },

                {
                    field: 'className',
                    title: '班级'
                },

                {
                    field: 'beginTime',
                    title: '开始时间'
                },
                {
                    field: 'endTime',
                    title: '结束时间'
                },
                {
                    field: 'reason',
                    title: '原因'
                },

                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        if(row.status == 1){
                            actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>去处理</a> ');
                        }
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>